function output = LoadMemory(P)

% global memory variables
global actions;
global running;
global timers;

global actions_op;
global running_op;
global timers_op;

P_color = P{2};
P_num = P{3};

if (P_color == 'r')
    is_running = running(P_num);
    action = actions(P_num);
    timer = timers(P_num);
else
    is_running = running_op(P_num);
    action = actions_op(P_num);
    timer = timers_op(P_num);
end

output = [is_running, action, timer];

end